import request from '@/utils/request'

//获取

export function commoditysList() {
return request({
    url: '/commoditys',
    method: 'get',
  })
}
//删除
export function deletecommoditys(id) {
  return request({
    url: `/commoditys/${id}`,
    method: "delete"
  })
}
//增加

export function addcommoditys(addForm) {

  return request({
    url: `/commoditys`,
    method: "post",
    data:addForm
  })
}


//修改
export function updatecommoditys(updateForm) {
  return request({
    url: `/commoditys/${updateForm._id}`,
    method: "put",
    data: updateForm
  })
}